<%@ page language="java" import="java.util.*,com.lmpop.trade.ti_attach.*,com.lmpop.trade.uploadFile.*,com.lmpop.frame.util.*,java.io.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
 
 <% 
	
		
		String attach_root_id = "111",img_type="0",tabShow="0";
		
		if(request.getParameter("attach_root_id")!=null && !request.getParameter("attach_root_id").equals("")){
			attach_root_id = request.getParameter("attach_root_id");
		}
		if(request.getParameter("img_type")!=null && !request.getParameter("img_type").equals("")){
			img_type = request.getParameter("img_type");
		}
		if(request.getParameter("tabShow")!=null && !request.getParameter("tabShow").equals("")){
			tabShow = request.getParameter("tabShow");
		}
 
				
		//ReturnImgWH  retwh = new ReturnImgWH();
		Config conf = new Config();
		//conf.init();
		//String rootpath = conf.getString("rootpath");

		Ti_attachInfo attachInfo = new Ti_attachInfo();
		
		Hashtable suoMap = new Hashtable();
	    suoMap.put("attach_root_id",attach_root_id);	
	    suoMap.put("file_type","0");
	    String imgpath = "",dis_img="",suo_attach_id="";	
	    List suoList = attachInfo.getAttachInfoByMap(suoMap);
		
	
		
	%>

<html>
<head>
<title>图片上传</title>
<link  href="/program/plugins/upload/uploadImg/css.css" rel="stylesheet"  type="text/css" />
<script type="text/javascript" src="/js/jquery.js"></script> 
<script type="text/javascript" src="/program/plugins/upload/uploadImg/upload.js"></script>
<script type="text/javascript">
      
	  $(document).ready(function(){
		  $(".tab_content").hide();
		  $("ul.tabs li:first").addClass("active").show();
		  $(".tab_content:first").show();
		  $("ul.tabs li").click(function(){
				   $("ul.tabs li").removeClass("active");
				   $(this).addClass("active");
				   $(".tab_content").hide();
				   var activeTab = $(this).find("a").attr("href");
				   $(activeTab).fadeIn();
				   return false;
		  });
	
});
</script>
<style type="text/css">
.col_b{ width:100px; height:55px; border:1px solid #b1b5b4; float:left; margin-right:5px;  }
.col_b_i{ float:left; font-weight:normal; width:32px; height:53px; padding:1px; padding-left:15px; }
.col_b_t{ float:right; font-size:12px; color:#5f5f5f; font-weight:normal; padding-top:6px; padding-right:6px; }
.col_b2{ width:100px; height:53px; border:2px solid #496281; float:left; margin-right:5px; }
.clear{ clear:both; }
</style>

</head>

<body>
 <div class="top">
     <div class="logo"><a href="/"><img src="/program/plugins/upload/uploadImg/images/logo_1.jpg" /></a></div>
     <div class="sc"><a href="#"><img src="/program/plugins/upload/uploadImg/images/wz_03.jpg" /></a></div>
 </div>
<hr/>

	
	<div class="w990">
	
	<ul class="tabs">
 
	<li><a href="#tab1">上传分类属性图片</a></li>
 
 
</ul> 
 

 <%if(suoList!=null && suoList.size()>0){ %>

    &nbsp;<input type="button" value="确认上传" onclick="closeNotTip()" class="butcss"/>
 
 <%}  %>

   
<div class="tab_container" >

<div id="tab1" class="tab_content">
  

  
  <div style="margin-top:10px;"></div>  
   
   <form name="uploadform" method="POST" action="/servlet/uploadImg" ENCTYPE="multipart/form-data">
			
			<table width="100%" border=0 cellpadding=2 cellspacing=2 align=left >
				<tr>
					<td  align="center">
						
				<%

				if(suoList!=null && suoList.size()>0){
				
				  for(int i=0;i<suoList.size();i++){
				  Hashtable soMap = (Hashtable)suoList.get(i);
				  String attach_name="",file_path="",attach_id="";
				  if(soMap.get("attach_name")!=null) attach_name= soMap.get("attach_name").toString();
				  if(soMap.get("file_path")!=null) file_path= soMap.get("file_path").toString();
				  if(soMap.get("attach_id")!=null) attach_id= soMap.get("attach_id").toString();
				
				
				%>
				<div class="col_b">
			      <div class="col_b_i"><img src="<%=file_path%>" border="0" /></div>
			      <div class="col_b_t"><%=attach_name%></div>
				
				  <div style="padding-top:30px;"><a href='/doTradeReg.do?pkid=<%=attach_id%>&bpm_id=5712&file_path=<%=file_path%>' >删除</a></div>
				   <div class="clear"></div>
		        </div>
		         
		       <%
			       }
				 }
			   %>
		
		
		<div class="clear"></div>
						
				    </td>
           </tr>
		   <tr>
            <td style="font-size:12px;" valign="top">
                    
					  属性名称<font color="red">*</font><input type="text" name="catname" id="catname" value="" size="40"><br/>
					  
					  属性图片<font color="red">*</font><input name="catfile" id="catfile" size="40" type="file">
					  	                  <div style="margin-top:8px"></div>
					  
					  图片格式限制:&nbsp;<font color="#303A43"><%=conf.getString("imagesext")%>;</font>
					  
					  <div style="margin-top:8px"></div>
				      <img src="/program/images/bullet_error.png" border=0 />请您上传相应大小的图片，否则将影响前台的展示！
	                 
					 <div style="margin-top:8px"></div>
			   		
					 
					  缩略图大小限制:&nbsp;<font color="#303A43">宽<%=conf.getString("cat_img_width")%>px，高<%=conf.getString("cat_img_height")%>px;</font>			   		
			  
                     
					  <div style="margin-top:8px"></div>
			          <input name="formSub" value="上 传"  type="button"  class="butcss"  onclick="uploudImg('a')"/>
				
					</td>
				</tr>
				
			</table>
				<input type="hidden" name="attach_root_id" value="<%=attach_root_id%>" />
			
		        <input type="hidden" value="<%=conf.getString("imagesext")%>"  name="imagesext" id="imagesext" />
		</form>
                    
</div>



</div> 
</div>

 <form action="/doTradeReg.do" method="post" name="DXform">
     <input type="hidden" name ="pkid_path" id="pkid_path" value="">
     <input type="hidden" name ="bpm_id" value="2369">
	 <input type="hidden" name ="tabShow" value="1">
	  
 </form>
  
</body>
</html>
